package com.server.entity;

import java.util.Date;
import java.util.StringJoiner;

/**
 * The type Login.
 */
public class Login {
    private Integer userLoginId;

    private String userLoginIpV4Address;

    private String userLoginAddress;

    private Date userLoginTime;

    private Integer userInfo;

    /**
     * Instantiates a new Login.
     *
     * @param userLoginIpV4Address the user login ip v 4 address
     * @param userLoginAddress     the user login address
     * @param userLoginTime        the user login time
     * @param userInfo             the user info
     */
    public Login(String userLoginIpV4Address, String userLoginAddress, Date userLoginTime, Integer userInfo) {
        this.userLoginIpV4Address = userLoginIpV4Address;
        this.userLoginAddress = userLoginAddress;
        this.userLoginTime = userLoginTime;
        this.userInfo = userInfo;
    }

    /**
     * Instantiates a new Login.
     */
    public Login() {
    }

    /**
     * Gets user login id.
     *
     * @return the user login id
     */
    public Integer getUserLoginId() {
        return userLoginId;
    }

    /**
     * Sets user login id.
     *
     * @param userLoginId the user login id
     */
    public void setUserLoginId(Integer userLoginId) {
        this.userLoginId = userLoginId;
    }

    /**
     * Gets user login ip v 4 address.
     *
     * @return the user login ip v 4 address
     */
    public String getUserLoginIpV4Address() {
        return userLoginIpV4Address;
    }

    /**
     * Sets user login ip v 4 address.
     *
     * @param userLoginIpV4Address the user login ip v 4 address
     */
    public void setUserLoginIpV4Address(String userLoginIpV4Address) {
        this.userLoginIpV4Address = userLoginIpV4Address == null ? null : userLoginIpV4Address.trim();
    }

    /**
     * Gets user login address.
     *
     * @return the user login address
     */
    public String getUserLoginAddress() {
        return userLoginAddress;
    }

    /**
     * Sets user login address.
     *
     * @param userLoginAddress the user login address
     */
    public void setUserLoginAddress(String userLoginAddress) {
        this.userLoginAddress = userLoginAddress == null ? null : userLoginAddress.trim();
    }

    /**
     * Gets user login time.
     *
     * @return the user login time
     */
    public Date getUserLoginTime() {
        return userLoginTime;
    }

    /**
     * Sets user login time.
     *
     * @param userLoginTime the user login time
     */
    public void setUserLoginTime(Date userLoginTime) {
        this.userLoginTime = userLoginTime;
    }

    /**
     * Gets user info.
     *
     * @return the user info
     */
    public Integer getUserInfo() {
        return userInfo;
    }

    /**
     * Sets user info.
     *
     * @param userInfo the user info
     */
    public void setUserInfo(Integer userInfo) {
        this.userInfo = userInfo;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", Login.class.getSimpleName() + "[", "]")
                .add("userLoginId=" + userLoginId)
                .add("userLoginIpV4Address='" + userLoginIpV4Address + "'")
                .add("userLoginAddress='" + userLoginAddress + "'")
                .add("userLoginTime=" + userLoginTime)
                .add("userInfo=" + userInfo)
                .toString();
    }
}